<?php 
/* SVN FILE: $Id$ */
/* Order Test cases generated on: 2009-09-10 10:35:25 : 1252578925*/
App::import('Model', 'Order');

class OrderTestCase extends CakeTestCase {
	var $Order = null;
	var $fixtures = array('app.order', 'app.customer', 'app.payment', 'app.transaction');

	function startTest() {
		$this->Order =& ClassRegistry::init('Order');
	}

	function testOrderInstance() {
		$this->assertTrue(is_a($this->Order, 'Order'));
	}

	function testOrderFind() {
		$this->Order->recursive = -1;
		$results = $this->Order->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('Order' => array(
			'id'  => 1,
			'order_number'  => 'Lorem ipsum dolor sit amet',
			'print_count'  => 1,
			'created'  => '2009-09-10',
			'print_date'  => '2009-09-10',
			'created_by'  => 'Lorem ipsum dolor sit amet',
			'ship_via'  => 'Lorem ipsum dolor sit amet',
			'sales_terms'  => 1,
			'sales_person'  => 'Lorem ipsum dolor sit amet',
			'delivery_date'  => '2009-09-10',
			'customer_id'  => 1,
			'approved'  => 1,
			'assigned_to'  => 'Lorem ipsum dolor sit amet'
		));
		$this->assertEqual($results, $expected);
	}
}
?>